
{if $full_page }

{include file="pageheader.htm"}

<script src="js/utils.js" ></script>
<script src="js/listtable.js" ></script>

{include file="orders_search.htm"}

<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">

  <!-- start orders list -->
  <div class="list-div" id="listDiv">

{/if}

<table cellpadding="3" cellspacing="1">

  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="javascript:listTable.sort('record_id'); ">{$lang.record_id}</a>{$sort_record_id}
    </th>
    <th><a href="javascript:listTable.sort('datetime'); ">{$lang.order_datetime}</a>{$sort_datetime}</th>
    <th><a href="javascript:listTable.sort('totalprice'); ">{$lang.order_totalprice}</a>{$sort_totalprice}</th>
    <th><a href="javascript:listTable.sort('customer'); ">{$lang.customer_name}</a>{$sort_customer_name}</th>
    <th><a href="javascript:listTable.sort('orderstatus'); ">{$lang.order_status}</a>{$sort_order_status}</th>
    <th>{$lang.handler}</th>
  <tr>

  {foreach from=$orderlist item=order}

  <tr>
    <td><input type="checkbox" name="checkboxes[]" value="{$order.orders_id}" />{$order.orders_id}</td>

    <td class="first-cell" >{$order.date_purchased}</td>

    <td>{$order.order_total}</td>
    <td align="right"> {$order.customer_lname} &nbsp; {$order.customer_rname}</td>
    <td align="center"> {$order.status}</td>

    <td align="center">

	<a href="?page=orders&action=view&id={$order.orders_id}" title="{$lang.view}">
	<img src="images/icon_view.gif" width="16" height="16" border="0" /></a>
	<a href="?page=orders&action=edit&id={$order.orders_id}" title="{$lang.edit}"><img src="images/icon_edit.gif" width="16" height="16" border="0" /></a>
    <a href="?page=orders&action=drop&id={$order.orders_id}"  onclick="return confirm('{$lang.drop_notice}');"><img src="images/icon_trash.gif" width="16" height="16" border="0" /></a>	

	</td>

  </tr>

  {foreachelse}
  <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
  {/foreach}

</table>
<!-- end order list -->

<!-- pages -->
<table id="page-table" cellspacing="0">
  <tr>
     <td align="right" nowrap="true">
    {include file="page.htm"}
    </td>
  </tr>
</table>


{if $full_page}

</div>
</form>

<script type="text/javascript">

  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach} 
 
</script>
{include file="pagefooter.htm"}

{/if}